package cn.maxwell.openfeign;

import cn.maxwell.domain.Product;
import cn.maxwell.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/product")
@FeignClient(value = "product-server",fallbackFactory = StoreProductFeign.class)
public interface OPenFeignInterface {
    @GetMapping("/loadById/{id}")
    Product loadById(@PathVariable("id") Long id);

    @PostMapping("/add")
    JsonResult add(@RequestBody Product product);
}
